import numpy as np
import matplotlib.pyplot as plt
# 导入3D包
from mpl_toolkits.mplot3d import Axes3D

# 绘制三维图

# 创建 X、Y、Z 坐标
X = [1, 1, 2, 2]
Y = [3, 4, 4, 3]
Z = [1, 100, 1, 1]
fig = plt.figure()
# 创建了一个 Axes3D 的子图放到 figure 画布里面
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(X, Y, Z)

plt.show()
